import os
import sys

# Add the project root to the path
sys.path.append(os.path.join(os.path.dirname(__file__), 'manage1', 'manage'))

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'property_management.settings')

import django
django.setup()

from property.models import Community

print("Community List:")
print("=" * 20)
for community in Community.objects.all():
    print(f"ID: {community.id}, Name: {community.name}")
print("=" * 20)